package com.wuhanpe.leafid.factory

import java.util.concurrent.ThreadFactory

/**
 * @author zooy
 * @since 2025/9/12-16:50
 */
class UpdateThreadFactory: ThreadFactory {

    var threadInitNumber: Int = 0

    @Synchronized
    private fun nextThreadNum(): Int {
        return threadInitNumber++
    }

    override fun newThread(r: Runnable?): Thread {
        return Thread(r, "Thread-Segment-Update-" + nextThreadNum())
    }
}
